<%@page import="com.system.dao.RoleDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="ui" uri="http://com.am.tag" %>
<%@ include file="../common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'userEdit.jsp' starting page</title>
    <script type="text/javascript" src="${path}/js/public/grid.js"></script>
    <script type="text/javascript">
    	function hospitalRender(value ,record,columnObj,grid,colNo,rowNo)
		{
			if(value == "0")
			{
				return "南方医科大学第三附属医院";	
			}
			else if(value == "1")
			{
				return "广州市第一人民医院";	
			}
			else if(value == "2")
			{
				return "暨南大学附属第一医院";	
			}
			else if(value == "3")
			{
				return "中山大学附属第一医院";	
			}
		}
		
		
		function doQuery()
  		{
			if($("#startDate").val().localeCompare($("#endDate").val()) > 0)
 			{
 				alert("起止日期不能大于结束日期");
 				return;
 			}
  			resetGrid(mygrid,"queryForm");
  		}
  		
  		function doReset()
    	{
  			$("#user_name").val("");
    		$("#startDate").val("");
    		$("#endDate").val("");
    	}
    </script>
  </head>
  
  <body style="overflow-x: hidden;overflow-y:hidden;">
  		<table id="" cellSpacing="0" cellPadding="0" style="width:100%;height:100%;" border="0">
   			<tr id="">
	  			<td style="height:35px;width:100%" class="windowHead">	
		  			<form id="queryForm">
						<table cellSpacing="0" cellPadding="0" width="100%" height="100%" border="0"  style="margin-left: 10px;">
							<tr>
								<td class="mywindowTitle">
									接诊医生：<input name="search_CONTAIN_user_name" id="user_name" class="textbox" style="width: 130px;margin-right: 10px" />&nbsp;&nbsp;
									请假时间：<ui:DateTimePicker name="search_GTE_create_time" id="startDate" dateFormat="yyyy-MM-dd HH:mm:ss" style="width:155px" />
									<span style="margin-left:0px;margin-right:0px;">&gt;&gt;</span>
									<ui:DateTimePicker name="search_LTE_create_time" id="endDate" dateFormat="yyyy-MM-dd HH:mm:ss" style="width:155px" />
									&nbsp;&nbsp;<ui:Button type="query" onclick="doQuery()">查询</ui:Button>&nbsp;&nbsp;
									<ui:Button onclick="doReset()"><img src="${path}/images/menu/reset.png" />重置</ui:Button>&nbsp;&nbsp;&nbsp;&nbsp;
								</td>
							</tr>
						</table>
					</form>
					<br/>
					<a style="text-decoration: none;"></a>
				</td>
			</tr>
			<tr id="">
				<td style="width:100%;height:100%;overflow:hidden"  class="windowBody">
					<div id="mess_box" style="width:100%;height:100%;overflow:hidden">
							<ui:Grid id="mygrid" css="width:100%;height:100%"
				    			 onCellClicked="selectedSingleRow2"
				    			 parameters='"personId":"${param.personId}"'
				    		 	 dataProvider="com.system.provider.ReferralProvider:getData" >
				    			<ui:GridField name="person_name" header="转诊病人" align="center" width="20%"/>
				    			<ui:GridField name="create_time" header="创建时间" align="center" width="25%"/>
				    			<ui:GridField name="hospital" header="转诊医院" align="center" width="25%" render="hospitalRender"/>
				    			<ui:GridField name="subject" header="科室" align="center" width="10%"/>
				    			<ui:GridField name="user_name" header="接诊医生" align="center" width="20%"/>
			    			</ui:Grid>
		    		</div>
		   	 	</td>
			</tr>
  		</table>
  </body>
</html>
